package com.library.mapper;

import com.library.bean.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {

    /**
     * 添加用户
     */
    int insertUser(User user);

    /**
     * 根据用户名查找用户
     */
    User selectUserByUserName(String username);


    /**
     * 通过用户名和密码来查找用户
     */
    User selectUserByUserNameAndPassword(User user);

    /**
     * 修改头像
     */
    int updateUserHeadImg(@Param("username") String username,@Param("headImg") String headImg);
}
